<template>
	<view class="page">
		<view class="pageBg">
			<image src="https://bjsx.gzwhir.com/admin-api/infra/file/18/get/memberbg2.png" mode="aspectFill"></image>
		</view>
		<view class="flex0">
			<u-navbar :fixed='false' bgColor="transparent" @leftClick="navBack" title="干预措施">
				<view slot="center" class="navTitle">
					干预措施
				</view>
			</u-navbar>
		</view>
		<view class="flex1">
			<scroll-view scroll-y="true" class="scrollView pt30">
				<view class="pd30">
					<view class="wbox">
						<view class="wtit">
							<view class="tl">
								<view class="ico">
									<image src="@/static/images/icon-wjdj.svg" mode="aspectFit"></image>
								</view>
								<view class="t">
									危机等级
								</view>
							</view>
							<view class="tr">
								<view class="tag"
									:style="'color:'+stageOption(info.level).color+';background:'+stageOption(info.level).bgColor">
									{{stageOption(info.level).label}}
								</view>
							</view>
						</view>
						<view class="interveneGrade">
							<view class="cl">
								查看学生档案权限
							</view>
							<view class="cr">
								<CheckboxGroup :multiple="true" :options="permissions" @change="updatePermission"
									:value="form.viewPermission"></CheckboxGroup>
							</view>
						</view>
					</view>
					<view class="wbox gyform s1" v-for="(item,index) in onCampusList" :key="index">
						<view class="wtit">
							<view class="tl">
								干预措施
							</view>
							<view class="tr">
								<view class="targetTag">
									<view class="tt">
										任务对象
									</view>
									<view class="tp">
										{{item.showTypeName}}
									</view>
								</view>
							</view>
						</view>

						<view class="workList">
							<view class="workBox">
								<view class="wkitem">
									<view class="tit pink" :class="index==0?'s2':''">
										<view class="titin">
											<view class="tl">
												<view class="or">{{(index+1)}}</view>
												<view class="t">
													校内会诊
												</view>
											</view>
											<view class="tr">
												<view class="del" @tap="delZhenTask('')">
													<image src="@/static/images/icon-delete.svg" mode="aspectFit">
													</image>
												</view>
											</view>
										</view>
									</view>
									<view class="rpt">
										<view class="subt">
											<view class="dot"></view>
											<view class="tc" style="background: none;padding:0;">
												<view class="t">会议时间/地点</view>
												<view class="tr"></view>
											</view>
										</view>
										<view class="ul">
											<view class="li">
												<view class="hzform">
													<view class="hi">
														<DateRange formate="YYYY-MM-DD hh:mm" mode='datetime'
															@change="setConsultationDate" startPlaceholder="会诊开始时间"
															endPlaceholder="会诊结束时间"></DateRange>
													</view>
													<view class="hi">
														<input type="text" placeholder="会诊地点" v-model="item.address" />
													</view>
												</view>
											</view>
										</view>
										<view class="subt" v-for="(item1,index1) in item.notifyList" :key="index1">
											<view class="dot"></view>
											<view class="tc">
												<view class="t">{{item1.name}}</view>
												<view class="tr" style="display: flex;align-items: center;">
													<view class="btn" @tap="toNoticeView(index,index1,item1)">
														预览
													</view>
													<view class="del" style="margin-left: 20rpx;"
														@tap="delZhenTask(item1)">
														<image src="@/static/images/icon-cha.svg" mode="aspectFit">
														</image>
													</view>
												</view>
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>

					<view class="wbox gyform s1" v-if="item.select" v-for="(item,index) in notifyTypes" :key="index">
						<view class="wtit">
							<view class="tl">
								干预措施
							</view>
							<view class="tr">
								<view class="targetTag">
									<view class="tt">
										任务对象
									</view>
									<view class="tp">
										{{item.name}}
									</view>
								</view>
							</view>
						</view>

						<view class="workList">
							<view class="workBox">
								<view class="wkitem" v-if="l.select && l.type!=5" v-for="(l,lindex) in item.plans"
									:key="lindex">
									<view class="tit pink" :class="lindex==0?'s2':''">
										<view class="titin">
											<view class="tl">
												<view class="or">{{(lindex+1)}}</view>
												<view class="t">
													{{l.name}}
												</view>
											</view>
											<view class="tr">
												<view class="del" @tap="delAllTask(index,lindex)">
													<image src="@/static/images/icon-delete.svg" mode="aspectFit">
													</image>
												</view>
											</view>
										</view>
									</view>
									<template v-for="(m,mindex) in l.defaultList">
										<view class="rpt">

											<view class="subt" v-if="l.type==6">
												<view class="dot"></view>
												<view class="tc" style="background: none;padding:0;">
													<view class="t" v-html="m.content"></view>
												</view>

											</view>
											<!-- <view class="subt">
												<view class="dot"></view>
												<view class="tc"
													style="background: linear-gradient(90deg, #f2f2f2, #fff);padding-left: 22rpx;padding-right: 0;">
													<view class="t">{{m.title}}</view>
													<view class="tr">
														<view class="btn"
															@tap="viewSafetyNotice('allTask',lindex,mindex,m.formdata)">
															预览
														</view>
													</view>
												</view>
											</view> -->
											<!-- <view class="subt">
												<view class="dot"></view>
												<view class="tc"
													style="background: linear-gradient(90deg, #f2f2f2, #fff);padding-left: 22rpx;padding-right: 0;">
													<view class="t">{{m.title}}</view>
													<view class="tr">
														<view class="btn"
															@tap="viewConsultationTemplate({toName:m.toName,grade:info.grade,class:info.class,name:info.name,form:l.list[0].formdata})">
															预览
														</view>
													</view>
												</view>
											</view> -->

											<view class="subt"
												v-if="l.type==1 || l.type==3 ||l.type==4 ||l.type==7  || l.type==8 || l.type==9">
												<view class="dot"></view>
												<view class="tc">
													<view class="t">{{m.name}}</view>

													<view class="tr" style="display: flex;align-items: center;">
														<view class="btn" v-if="l.type==4 || l.type==8 || l.type==9"
															@tap="toNoticeView2(index,lindex,mindex,m)">
															预览
														</view>
														<view class="del" style="margin-left: 20rpx;"
															@tap="delItem(index,lindex,mindex)">
															<image src="@/static/images/icon-cha.svg" mode="aspectFit">
															</image>
														</view>
													</view>

												</view>
											</view>


										</view>
									</template>

									<view class="btncon" v-if="l.type==1 || l.type==7">
										<view class="addbtn" @tap="openLessonSelect(index,lindex,l)">
											添加
										</view>
									</view>
									<!-- <view class="btncon">
										<view class="wtips">
											<rich-text :nodes="m.content"></rich-text>
										</view>
									</view> -->
									<!-- <view class="rpt">
										<view class="subt s2" style="padding: 22rpx 0;">
											<view class="dot"></view>
											<view class="tc" style="background: none;padding: 0;">
												<view class="t" style="color: #65554d;">
													{{info.taskOptions.netHospital.title}}（可选）
												</view>
												<view class="tr"></view>
											</view>
										</view>
										<view class="subt nodot">
											<view class="dot" style="opacity: 0;"></view>
											<view class="tc" style="padding: 22rpx;background: #f2f2f2;">
												<view class="t">{{info.taskOptions.netHospital.subtitle}}</view>
												<view class="tr btns">
													<view class="vl"></view>
													<view class="wm" @tap="viewDetail(info.taskOptions.netHospital.id)">
														预览
													</view>
													<view class="sw">
														<u-switch space="3" activeColor="#fe9c29"
															inactiveColor="#dadada" v-model="isNetHospital"
															size="20"></u-switch>
													</view>
												</view>
											</view>
										</view>
									</view> -->
								</view>
							</view>
						</view>
					</view>
				</view>
			</scroll-view>
			<u-toast ref="uToast"></u-toast>
			<u-popup :show="show" @close="show=false" mode="center"
				:customStyle="{width:'100%',padding:'30rpx',boxSizing:'border-box',background:'none'}">
				<view class="taskPop">
					<view class="tit">
						添加任务项
					</view>
					<view class="tit2">
						干预方式（多选）
					</view>
					<scroll-view scroll-y style="height: 800rpx;">
						<view class="ls" v-if="notifyTypes&&notifyTypes.length>0">
							<view v-for="(item,index) in notifyTypes" :key="index">
								<view class="tit2">
									{{item.name}}
								</view>
								<view>
									<view class="li" @click="toSelect(index,catIdx)" v-for="(cat,catIdx) in item.plans"
										:key="catIdx" :class="cat.select?'on':''">
										<view class="ll">
											{{cat.name}}
										</view>
										<!-- <view class="lr">
										<CheckboxGroup :multiple="true" :options="cat.taskTarget" @change="updateValues"
											:data-index="index"></CheckboxGroup>
									</view> -->
									</view>
								</view>
							</view>
						</view>
					</scroll-view>
					<view class="ft">
						<view class="btn on" @tap="handleTaskAdd">
							确认添加
						</view>
						<view class="btn" @tap="show=false">
							取消
						</view>
					</view>
				</view>
			</u-popup>
		</view>
		<view class="flex0 pd30 ftools">
			<view class="btn" @tap="openAddtask">
				<view class="ico">
					<image src="@/static/images/icon-add.svg" mode="aspectFit"></image>
				</view>
				<view class="p">
					添加任务项
				</view>
			</view>
			<view class="btn on" @tap="submit">
				<view class="p">
					发布任务
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				itemid: '',
				show: false,
				addCategory: [],
				isNetHospital: false,
				permissions: [{
						value: 1,
						label: '家长'
					},
					{
						value: 2,
						label: '班主任'
					}
				],
				info: '',
				notifyTypes: [],
				notifyTypes: [],
				onCampusList: [],
				form: {
					viewPermission: [],
					studentTask: [],
					teacherTask: [],
					parentTask: [],
					allTask: []
				}
			}
		},
		methods: {
			toNoticeView(index, index1, item1) {

				var that = this;
				let data = {
					index,
					index1,
					content: item1.content
				};

				this.$db.set('zhenNotice', data)

				uni.navigateTo({
					url: '/subpage/noticeTemplate/index'
				})


			},
			toNoticeView2(index, lindex, mindex, m) {

				var that = this;
				let data = {
					index,
					lindex,
					mindex,
					content: m.content
				};
				this.$db.set('allNotice', data)

				uni.navigateTo({
					url: '/subpage/noticeTemplate/SafetyNotice'
				})
				// uni.setStorage({
				// 	key: 'allNotice',
				// 	data: JSON.stringify(data),
				// 	success() {
				// 		uni.navigateTo({
				// 			url: '/subpage/noticeTemplate/SafetyNotice'
				// 		})
				// 	}
				// })


			},
			delZhenTask(row) {
				let isDelete = true
				if (row) {

					this.notifyTypes.some(item => {
						if (item.type == row.notifyUserType) {
							item.plans.some(item1 => {
								if (item1.type == 5) {
									item1.select = false
								}
							})
						}
					})
				} else {


					this.notifyTypes.some(item => {
						item.plans.some(item1 => {
							if (item1.type == 5) {
								item1.select = false
							}
						})
					})

				}

				this.getZhenList()
			},
			submit() { //发布任务
				uni.showLoading()
				let post = {
					"managementId": this.itemid,
					"headTeacherPower": false,
					"parentPower": false,
					onCampusList: this.onCampusList,
					notifyTypeList: []
				}
				this.notifyTypes.some((item) => {

					if (item.select) {

						let addItem = {
							type: item.type,
							interveneList: []
						}
						item.plans.some((item1) => {
							if (item1.select) {
								let addItem1 = {
									plan: item1.type,
									tasksList: []
								}
								item1.defaultList.some(item2 => {
									let i2 = {
										"bizContent": item2.content,
										"bizName": item2.name,
										"bizId": item2.id
									}
									addItem1.tasksList.push(i2)
								})
								addItem.interveneList.push(addItem1)
							}
						})
						post.notifyTypeList.push(addItem)
					}
				})
				if (this.form.viewPermission.length > 0) {
					this.form.viewPermission.some((item) => {
						if (item == 1) {
							post.parentPower = true
						}
						if (item == 2) {
							post.headTeacherPower = true
						}
					})
				}
				this.$api.interveneCreate(post, res => {
					if (res.code == 200) {
						uni.hideLoading()
						this.$common.successToShow('发布成功', ress => {
							uni.navigateBack()
						})
					} else {
						uni.hideLoading()
						this.$common.errorToShow(res.message)
					}
				})

			},
			toSelect(idx, idx1) {
				this.notifyTypes[idx].plans[idx1].select = !this.notifyTypes[idx].plans[idx1].select

			},
			viewDetail(id) { //通知详情
				uni.navigateTo({
					url: '/subpage/notice/notice?id=' + id
				})
			},
			previewLetter(id, formid) { //预览转介信
				if (!formid) {
					if (this.$refs.uToast) {
						this.$refs.uToast.show({
							type: 'error',
							icon: false,
							message: '请先完成表单!'
						});
					};
					return;
				};
				uni.navigateTo({
					url: '/subpage/teacher/letter/letter?id=' + id + '&formid=' + formid
				})
			},
			openLetterForm(id) {
				var that = this;
				let data = {
					form: that.form
				};
				uni.setStorage({
					key: 'tempData',
					data: JSON.stringify(data),
					success() {
						uni.navigateTo({
							url: '/subpage/teacher/letter/form?id=' + id
						})
					}
				})

			},
			handleTaskAdd() { //确认添加任务
				var that = this;
				that.notifyTypes.some(item => {
					item.select = false
					item.plans.some(item1 => {
						if (item1.select) {
							item.select = true
						}
					})
				})
				that.show = false;
				that.getZhenList()
			},
			updateValues(e) {
				var that = this;
				var index = e.currentTarget.dataset.index;
				var value = e.detail.__args__[0];
				that.addCategory[index].values = value;
			},
			openAddtask() { //打开添加任务
				var that = this;
				that.show = true;
			},
			openLessonSelect(index, targetIndex, l) { //添加课程
				var that = this;
				let data = {
					operateIndex: index,
					operateTargetIndex: targetIndex
				};
				uni.setStorage({
					key: 'tempData',
					data: JSON.stringify(data),
					success() {


						if (l.type == 1) {

							uni.navigateTo({
								url: '/subpage/lesson/lesson'
							})
						} else {
							uni.navigateTo({
								url: '/subpage/selectEvaluation/selectEvaluation'
							})
						}
					}
				})
			},
			addEvaluation(target, index) { //添加测评表
				var that = this;
				let data = {
					operateIndex: index,
					operateTarget: target,
					form: that.form
				};
				uni.setStorage({
					key: 'tempData',
					data: JSON.stringify(data),
					success() {
						uni.navigateTo({
							url: '/subpage/selectEvaluation/selectEvaluation'
						})
					}
				})
			},
			delAllTask(index, index1) { //删除全体目标任务
				console.log(index, index1, 12121)
				var that = this;
				that.notifyTypes[index].plans[index1].select = false;
				let isDelete = true
				that.notifyTypes[index].plans.some(item => {
					if (item.select) {
						isDelete = false
					}
				})
				if (isDelete) {
					that.notifyTypes[index].select = false
				}
			},
			delStudentTask(index) { //删除学生任务
				var that = this;
				that.form.studentTask.splice(index, 1);
			},
			delTeacherTask(index) { //删除老师任务
				var that = this;
				that.form.teacherTask.splice(index, 1);
			},
			delParentTask(index) { //删除家长任务
				var that = this;
				that.form.parentTask.splice(index, 1);
			},
			delItem(taskIndex, typeIndex, targetIndex) { //删除任务内详细列表项，参数(对象名称，任务下标，列表项下标)
				var that = this;
				that.notifyTypes[taskIndex].plans[typeIndex].defaultList.splice(targetIndex, 1);
			},
			updatePermission(e) { //更新档案权限
				this.form.viewPermission = e.detail.__args__[0];
			},
			getInfo() {

				this.$api.crisisInfo({
					id: this.itemid,
					methodType: 'get'
				}, res => {
					if (res.code == 200) {
						this.info = res.data;

						this.initData();
					} else {
						this.$common.errorToShow(res.message)
					}
				})
			},
			initData() {
				this.$api.interveneConfig({
					level: this.info.level,
					studentId: this.info.userId,
					methodType: 'get'
				}, res => {
					if (res.code == 200) {
						res.data.notifyTypes.some(item => {
							item.select = true
							item.plans.some(item1 => {
								item1.select = true
							})
						})
						this.notifyTypes = res.data.notifyTypes
						this.getZhenList()
					}
				})
			},
			getZhenList() {
				this.onCampusList = []
				let showTypeName = []
				let add = {
					showTypeName: '',
					"startTime": "",
					"endTime": "",
					"address": "",
					notifyList: []
				}

				this.notifyTypes.some(item => {
					if (item.select) {
						item.plans.some(item1 => {
							if (item1.type == 5 && item1.select) {
								showTypeName.push(item.name)
								item1.defaultList.some(item2 => {

									let item3 = {
										"notifyUserType": item.type,
										"name": item2.name,
										"content": item2.content
									}
									add.notifyList.push(item3)
								})
							}
						})
					}
				})
				add.showTypeName = String(showTypeName)
				if (showTypeName.length > 0) {

					this.onCampusList = [add]
				}
				console.log(this.onCampusList, 1111)
			},
			taskExist(taskType, target) { //任务是否已经存在，参数(任务类型，任务目标)
				var that = this;
				if (that.form[target].length == 0) {
					return false;
				} else {
					var ex = that.form[target].filter(i => i.workType == taskType);
					return ex.length > 0
				}
			},
			appendTaskList(target, index, arr) { //添加任务详细列表项，参数(任务目标，任务下标，数据列表)
				var that = this;
				let ids = [];
				that.form[target][index].list.forEach(i => {
					ids.push(i.id)
				});
				let appendArr = arr.filter(j => {
					return !ids.includes(j.id)
				});
				let newArr = that.form[target][index].list.concat(appendArr);
				that.form[target][index].list = newArr;
			},
			viewSafetyNotice(target, taskIndex, index, formdata) { //预览模板通知，参数(任务目标，任务下标，通知下标，已经填写的内容)
				var that = this;
				let data = {
					operateIndex: taskIndex,
					operateTarget: target,
					targetIndex: index,
					form: that.form
				};
				if (formdata) {
					data.formdata = JSON.stringify(formdata);
				};
				uni.setStorage({
					key: 'tempData',
					data: JSON.stringify(data),
					success() {
						uni.navigateTo({
							url: '/subpage/noticeTemplate/SafetyNotice'
						})
					}
				})
			},
			setConsultationDate(e) {
				var that = this;
				that.onCampusList[0].startTime = e.start;
				that.onCampusList[0].endTime = e.end;
			}
		},
		onLoad(e) {
			var that = this;
			that.itemid = e.id
			that.getInfo();
		},
		onShow() {
			var that = this;

			if (that.$db.get('zhenNotice')) {
				let noticeInfo = that.$db.get('zhenNotice');
				console.log(noticeInfo, that.onCampusList, 1111)

				that.onCampusList[noticeInfo.index].notifyList[noticeInfo.index1].content = noticeInfo.content
				that.$db.set('zhenNotice', '')
			}

			if (that.$db.get('allNotice')) {
				let noticeInfo = that.$db.get('allNotice');
				console.log(noticeInfo, 12313)
				that.notifyTypes[noticeInfo.index].plans[noticeInfo.lindex].defaultList[noticeInfo.mindex]
					.content = noticeInfo.content
				that.$db.set('allNotice', '')
			}

			uni.getStorage({
				key: 'tempData',
				success(res) {
					let data = JSON.parse(res.data);
					let operateIndex = data.operateIndex;
					let operateTargetIndex = data.operateTargetIndex;
					uni.getStorage({
						key: 'lessonTemp',
						success(res) {
							let arr = JSON.parse(res.data);
							let attrShow = []
							arr.some(item => {
								let i = {
									content: null,
									id: item.id,
									name: item.title,
									params: null
								}
								attrShow.push(i)
							})
							let targetForm = that.notifyTypes[operateIndex].plans[operateTargetIndex]
								.defaultList
							console.log(targetForm, 121212)
							that.notifyTypes[operateIndex].plans[operateTargetIndex].defaultList = [...
								targetForm, ...attrShow
							]
							uni.removeStorage({
								key: 'lessonTemp'
							})
						}
					});
					
					
					uni.getStorage({
						key: 'cepingTemp',
						success(res) {
							
								let arr = JSON.parse(res.data);
								let attrShow = []
								arr.some(item => {
									let i = {
										content: null,
										id: item.id,
										name: item.name,
										params: null
									}
									attrShow.push(i)
								})
								let targetForm = that.notifyTypes[operateIndex].plans[operateTargetIndex]
									.defaultList
								console.log(targetForm, 121212)
								that.notifyTypes[operateIndex].plans[operateTargetIndex].defaultList = [...
									targetForm, ...attrShow
								]
							uni.removeStorage({
								key: 'cepingTemp'
							})
						}
					});
					
					
					uni.getStorage({
						key: 'templateData',
						success(res) {
							let formdata = JSON.parse(res.data);
							that.form[operateTarget][operateIndex].list[targetIndex].formdata = formdata;
							uni.removeStorage({
								key: 'templateData'
							})
						}
					});
					uni.getStorage({
						key: 'letterFormId',
						success(res) {
							let id = JSON.parse(res.data);
							that.form.allTask[0].list[0].formid = id;
							uni.removeStorage({
								key: 'letterFormId'
							})
						}
					});
					uni.removeStorage({
						key: 'tempData'
					});
				}
			});
		}
	}
</script>

<style lang="scss" scoped>
	.wbox {
		padding: 30rpx 30rpx 20rpx;
		border-radius: 30rpx;
		background: #fff;
		margin-bottom: 20rpx;

		&:last-child {
			margin-bottom: 0;
		}

		.wtit {
			display: flex;
			align-items: center;
			justify-content: space-between;

			&.border {
				border: 1rpx solid #f7f5f2;
			}

			.tl {
				flex: 1 1 auto;
				overflow: hidden;
				display: flex;
				align-items: center;
				justify-content: flex-start;

				.ico {
					flex: 0 0 auto;
					margin-right: 20rpx;

					image {
						display: block;
						width: 32rpx;
						height: 32rpx;
					}
				}

				.t {
					flex: 1 1 auto;
					overflow: hidden;
					font-size: 32rpx;
					color: #65554d;
				}
			}

			.tr {
				flex: 0 0 auto;

				.tag {
					padding: 0 20rpx;
					line-height: 40rpx;
					font-size: 24rpx;
					border-radius: 6rpx;
				}

				.btn {
					padding: 0 12rpx;
					line-height: 40rpx;
					border-radius: 40rpx;
					font-size: 24rpx;
					background: #df7f83;
					color: #fff;
				}
			}
		}

		.rwdx {
			padding: 26rpx 30rpx;
			text-align: center;
			margin: 30rpx -30rpx 0;
			background: #ffebf2;
			color: #df6982;
			font-size: 24rpx;
			position: relative;

			&:after {
				content: "";
				position: absolute;
				right: 90rpx;
				bottom: 100%;
				border-left: 10rpx solid transparent;
				border-right: 10rpx solid transparent;
				border-bottom: 6rpx solid #ffebf2;
			}
		}

		.workBox {
			padding: 10rpx 0;

			.btncon {
				padding-left: 60rpx;
				position: relative;
				padding-bottom: 20rpx;
				padding-top: 20rpx;

				.wtips {
					padding: 0 0;
				}

				&:before {
					content: "";
					position: absolute;
					left: 14rpx;
					width: 4rpx;
					bottom: 0;
					top: 0;
					background: #e8e8e8;
					z-index: 1;
				}

				.addbtn {
					text-align: center;
					line-height: 66rpx;
					border: 2rpx solid #fe9c29;
					border-radius: 20rpx;
					font-size: 28rpx;
					color: #fe9c29;
				}
			}

			.tit {
				padding: 20rpx 0;
				background: none;
				display: block;

				.or {
					background: #df7f83;
				}

				.del {
					image {
						display: block;
						width: 36rpx;
						height: 36rpx;
					}
				}

				.titin {
					display: flex;
					align-items: center;
					justify-content: space-between;
					padding: 30rpx 30rpx 30rpx 0;
					background: linear-gradient(90deg, #fff, #dbf3e5);
					border-radius: 0 20rpx 20rpx 0;
				}

				.t {
					color: #df7f83;
				}

				&.pink {
					.titin {
						background: linear-gradient(90deg, #fff, #ffdeea);
					}
				}

				&:before {
					content: "";
					position: absolute;
					left: 14rpx;
					width: 4rpx;
					bottom: calc(50% + 10rpx);
					top: 0;
					background: #e8e8e8;
					z-index: 1;
				}

				&:after {
					content: "";
					position: absolute;
					left: 14rpx;
					width: 4rpx;
					top: calc(50% + 10rpx);
					bottom: 0;
					background: #e8e8e8;
					z-index: 1;
				}

				&.s2 {
					&:before {
						display: none;
					}

					&:after {
						display: block;
					}
				}
			}

			.rpt {
				.subt {
					padding: 10rpx 0;

					.tc {
						padding: 22rpx 22rpx 22rpx 0;
						border-radius: 20rpx;
						background: linear-gradient(90deg, #fff, #f2f2f2);
					}

					.tr {
						.del {
							image {
								display: block;
								width: 21rpx;
								height: 21rpx;
							}
						}

						&.btns {
							display: flex;
							align-items: center;

							.wm {
								flex: 0 0 auto;
								line-height: 40rpx;
								padding: 0 30rpx;
								color: #fe9c29;
							}

							.sw {
								flex: 0 0 auto;
							}

							.vl {
								flex: 0 0 auto;
								width: 2rpx;
								height: 24rpx;
								background: #d9d9d9;
							}

							.btn {
								min-width: 140rpx;
								margin-left: 10rpx;
								text-align: center;
							}
						}
					}
				}
			}
		}

		&.gyform {
			&.s1 {
				.targetTag {
					background: #df7f83;

					.tp {
						color: #df7f83;
					}
				}

				.workBox {
					.tit {
						.or {
							background: #df7f83;
						}

						.t {
							color: #df7f83;
						}

						.titin {
							background: linear-gradient(90deg, #fff, #ffdeea);
						}
					}
				}
			}

			&.s2 {
				.targetTag {
					background: #fe9c29;

					.tp {
						color: #fe9c29;
					}
				}

				.workBox {
					.tit {
						.or {
							background: #fe9c29;
						}

						.t {
							color: #fe9c29;
						}

						.titin {
							background: linear-gradient(90deg, #fff, #fff1de);
						}
					}
				}
			}

			&.s3 {
				.targetTag {
					background: #78cb9b;

					.tp {
						color: #78cb9b;
					}
				}

				.workBox {
					.tit {
						.or {
							background: #78cb9b;
						}

						.t {
							color: #78cb9b;
						}

						.titin {
							background: linear-gradient(90deg, #fff, #dbf3e5);
						}
					}
				}
			}
		}
	}

	.interveneGrade {
		margin-top: 20rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;

		.cl {
			flex: 1 1 auto;
			font-size: 28rpx;
			color: #897f7a;
			overflow: hidden;
			padding-right: 30rpx;
		}

		.cr {
			flex: 0 0 auto;
		}
	}

	.taskPop {
		background: #fff;
		padding: 40rpx 38rpx 10rpx;
		border-radius: 30rpx;
		color: #65554d;

		.tit {
			text-align: center;
			font-size: 40rpx;
			padding-bottom: 40rpx;
		}

		.tit2 {
			padding-bottom: 24rpx;
			font-size: 28rpx;
		}

		.ls {
			padding-bottom: 20rpx;

			.li {
				display: flex;
				align-items: center;
				padding: 40rpx 28rpx;
				border-radius: 20rpx;
				background: linear-gradient(90deg, #f4f2ef, #f9f8f6);
				margin-bottom: 20rpx;

				.ll {
					font-size: 28rpx;
					flex: 1 1 auto;
					padding-right: 20rpx;
				}

				.lr {
					flex: 0 0 auto;

					/deep/.radio {
						background: #fff;
					}
				}

				&.on {
					background: linear-gradient(90deg, #ffefdd, #fff8f0);
				}
			}
		}

		.ft {
			display: flex;
			align-items: stretch;
			justify-content: space-between;

			.btn {
				flex: 0 0 auto;
				width: 50%;
				font-size: 28rpx;
				color: #65554d;
				line-height: 100rpx;
				text-align: center;

				&.on {
					color: #fe9c29;
				}
			}
		}
	}

	.ftools {
		padding-top: 40rpx;
		padding-bottom: 60rpx;
		background: #fff;
		border-radius: 30rpx 30rpx 0 0;
		display: flex;
		align-items: center;

		.btn {
			flex: 0 0 auto;
			font-size: 28rpx;
			padding: 0 30rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			color: #fe9c29;
			background: #ffefdd;
			height: 90rpx;
			border-radius: 90rpx;
			margin-right: 20rpx;

			.ico {
				flex: 0 0 auto;
				margin-right: 20rpx;

				image {
					display: block;
					width: 34rpx;
					height: 34rpx;
				}
			}

			&.on {
				background: #fe9c29;
				color: #fff;
				flex: 1 1 auto;
			}

			&:last-child {
				margin-right: 0;
			}
		}
	}

	.hzform {
		flex: 0 0 auto;
		width: 100%;

		.hi {
			margin-bottom: 20rpx;
			background: #f3f3f3;
			border-radius: 80rpx;

			/deep/.dateRange {
				display: block !important;

				.box {
					background: #f3f3f3;
				}
			}

			input {
				padding: 0 30rpx;
				height: 80rpx;
				outline: none;
				border: none;
				font-size: 28rpx;
				background: none;
			}

			&:last-child {
				margin-bottom: 0;
			}
		}
	}
</style>